package com.ruoyi.shop.service;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.ShopkeeperMapper;
import com.ruoyi.shop.domain.Shopkeeper;
import com.ruoyi.shop.service.IShopkeeperService;

/**
 * 商家管理Service业务层处理
 *
 * @author ruoyi
 * @date 2025-06-05
 */
@Service
public class ShopkeeperServiceImpl implements IShopkeeperService
{
    @Autowired
    private ShopkeeperMapper shopkeeperMapper;

    /**
     * 查询商家管理
     *
     * @param shopid 商家管理主键
     * @return 商家管理
     */
    @Override
    public Shopkeeper selectShopkeeperByShopid(Long shopid)
    {
        return shopkeeperMapper.selectShopkeeperByShopid(shopid);
    }

    /**
     * 查询商家管理列表
     *
     * @param shopkeeper 商家管理
     * @return 商家管理
     */
    @Override
    public List<Shopkeeper> selectShopkeeperList(Shopkeeper shopkeeper)
    {
        return shopkeeperMapper.selectShopkeeperList(shopkeeper);
    }

    @Override
    public List<Shopkeeper> selectShopkeeperGoodsList(Shopkeeper shopkeeper) {
        return shopkeeperMapper.selectShopkeeperGoodsList(shopkeeper);
    }

    @Override
    public List<Shopkeeper> selectShopkeeperWithCategories(Shopkeeper shopkeeper) {
        return shopkeeperMapper.selectShopkeeperWithCategories(shopkeeper);
    }


    /**
     * 新增商家管理
     *
     * @param shopkeeper 商家管理
     * @return 结果
     */
    @Override
    public int insertShopkeeper(Shopkeeper shopkeeper)
    {
        return shopkeeperMapper.insertShopkeeper(shopkeeper);
    }

    /**
     * 修改商家管理
     *
     * @param shopkeeper 商家管理
     * @return 结果
     */
    @Override
    public int updateShopkeeper(Shopkeeper shopkeeper)
    {
        return shopkeeperMapper.updateShopkeeper(shopkeeper);
    }

    /**
     * 批量删除商家管理
     *
     * @param shopids 需要删除的商家管理主键
     * @return 结果
     */
    @Override
    public int deleteShopkeeperByShopids(Long[] shopids)
    {
        return shopkeeperMapper.deleteShopkeeperByShopids(shopids);
    }

    /**
     * 删除商家管理信息
     *
     * @param shopid 商家管理主键
     * @return 结果
     */
    @Override
    public int deleteShopkeeperByShopid(Long shopid)
    {
        return shopkeeperMapper.deleteShopkeeperByShopid(shopid);
    }
}
